﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using DAO;
using DTO;

namespace BUS
{
    public class THAMSOBUS
    {
        public DataTable LoadThamSo()
        {
            THAMSODAO tsDAO = new THAMSODAO();
            DataTable dt = new DataTable();
            dt = tsDAO.LoadThamSo();
            return dt;
        }

        public void SuaThamSo(int ma, int giatri, string kieu)
        {
            THAMSODAO tsDao = new THAMSODAO();
            tsDao.SuaThamSo(ma,giatri,kieu);
        }

        public DataTable LoadKhuyenMai()
        {
            THAMSODAO tsDAO = new THAMSODAO();
            DataTable dt = new DataTable();
            dt = tsDAO.LoadKhuyenMai();
            return dt;
        }

        public void ThemKhuyenMai(THAMSODTO tsDTO)
        {
            THAMSODAO tsDao = new THAMSODAO();
            tsDao.ThemKhuyenMai(tsDTO);
        }

        public void XoaKhuyenMai(int ma)
        {
            THAMSODAO tsDao = new THAMSODAO();
            tsDao.XoaKhuyenMai(ma);
        }

        public void SuaKhuyenMai(THAMSODTO tsDto)
        {
            THAMSODAO tsDao = new THAMSODAO();
            tsDao.SuaKhuyenMai(tsDto);
        }
    }
}
